import request from '@/utils/request'

export function getAllGradesAPI() {
  return request({
    url: '/grades/getAllGrades',
  })
}

export function getAllGradesByPageAPI(params) {
  return request({
    url: '/grades/getAllGradesByPage',
    params
  })
}
export function exportExcelAPI(params) {
  return request({
    url: '/grades/exportExcel',
    method: 'GET',
    responseType: 'blob', 
    params
  });
}

export function addOrEditGradeAPI(grade) {
  return request({
    url: '/grades/addOrEditGrade',
    method: 'post',
    data: grade
  })
}

export function deleteGradeAPI(gradeId){
  return request({
    url:`/grades/deleteGrade/${gradeId}`,
    method: 'delete'
  })
}